package com.atguigu.gmall.product.mapper;

import com.atguigu.gmall.product.model.SpuSaleAttr;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import java.util.List;
import java.util.Map;
@SuppressWarnings("all")
public interface SpuSaleAttrMapper extends BaseMapper<SpuSaleAttr> {
    List<SpuSaleAttr> getSpuSaleAttrList(Long spuId);

    /**
     * 根据SPU查询所有销售属性,用销售属性来判断当前商品是否被选中
     * @param skuId
     * @param spuId
     * @return
     */
    List<SpuSaleAttr> getSpuSaleAttrListBySku(Long skuId, Long spuId);

    List<Map<String, Object>> getSkuValueIdsMap(Long spuId);
}